//
//  SelfSizeTool.m
//  15---Homework15网易新闻
//
//  Created by 冀永金 on 16/8/3.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "SelfSizeTool.h"

@implementation SelfSizeTool
+ (CGFloat)selfSizeWidthString:(NSString *)string height:(CGFloat)height font:(UIFont *)font {
    CGRect newRect = [string boundingRectWithSize:CGSizeMake(0, height) options: NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil];
    return newRect.size.width;
}
@end
